$("#confirmPassword").blur(function () {
    if ($("#inputPassword").val() === $("#confirmPassword").val()) {
        console.log("对了呢",$("#inputPassword").val(),$("#confirmPassword").val())
    } else {
       alert("猪啊，确认密码不对")
       $("#confirmPassword").val("") 
    }
})
$(".btn").click(function(){
    var inputusr_value = $("#inputUsr").val();
    var inputpwd_value = $("#inputPassword").val();
    console.log(inputpwd_value,inputusr_value)
    $.ajax("http://localhost/php/register.php",
    {data:{
        username:inputusr_value,
        password:inputpwd_value
        
    }})
    .then(function(res){
        if(res.state === "success"){
            location.assign("./login.html");
        }else if(res.state === "error1"){
           alert(res.msg)
        }else if(res.state === "error2"){
            alert(res.msg)
        }
    })
})
